/*************************************************************************
> File Name: circular.cpp
> Author: hzy
> Created Time: 2023-08-08 14:35:09
> Description:
************************************************************************/
#include <iostream>

using namespace std;

const float PI = 3.14;

struct circular
{
private:
    float r;

public:
    void setR(float myR)
    {
        r = myR;
    }

    void getCircumference()
    {
        cout << "周长为:" << (2 * PI * r) << endl;
    }
    void getarea()
    {
        cout << "面积为:" << (PI * r * r) << endl;
    }
};

int main()
{
    circular cir;
    cir.setR(5);
    cir.getCircumference();
    cir.getarea();

    return 0;
}